﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display.DialogUI {
    import flash.utils.*;
    import org.aswing.*;
    import Classes.*;
    import flash.text.*;
    import Display.aswingui.*;

    public class GenericDialogWithBoldView extends GenericDialogView {

        private var strBoldMessage:String = "";

        public function GenericDialogWithBoldView(_arg1:Dictionary, _arg2:String="", _arg3:String="", _arg4:String="", _arg5:int=0, _arg6:Function=null, _arg7:String="", _arg8:int=0, _arg9:String="", _arg10:Function=null){
            this.strBoldMessage = _arg3;
            super(_arg1, _arg2, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10);
        }
        override protected function createTextComponent(_arg1:Number):Component{
            var _local2:Component;
            var _local6:Number;
            var _local7:Container;
            var _local3:Component = ASwingHelper.makeMultilineText(this.strBoldMessage, _arg1, EmbeddedArt.DEFAULT_FONT_NAME_BOLD, TextFormatAlign.LEFT, 20, EmbeddedArt.brownTextColor);
            var _local4:Component = ASwingHelper.makeMultilineText(m_message, _arg1, EmbeddedArt.DEFAULT_FONT_NAME_BOLD, TextFormatAlign.LEFT, 18, EmbeddedArt.brownTextColor);
            var _local5:Number = 75;
            if (_local4.getHeight() < _local5){
                _local6 = ((_local5 - _local4.getHeight()) / 2);
                _local7 = ASwingHelper.makeSoftBoxJPanelVertical();
                _local7.append(ASwingHelper.verticalStrut(_local6));
                _local7.append(_local3);
                _local7.append(ASwingHelper.verticalStrut(_local6));
                _local7.append(_local4);
                _local7.append(ASwingHelper.verticalStrut(_local6));
                _local2 = _local7;
            } else {
                _local2 = _local4;
            };
            return (_local2);
        }
        override protected function createTextArea():JPanel{
            var _local2:Number;
            var _local8:JPanel;
            var _local9:JPanel;
            var _local10:JPanel;
            var _local11:JPanel;
            var _local1:JPanel = ASwingHelper.makeSoftBoxJPanel(SoftBoxLayout.CENTER, 10);
            if (((!((m_icon == null))) && (!((m_icon == ""))))){
                _local2 = setMessageTextWidth((((m_iconPos == ICON_POS_LEFT)) || ((m_iconPos == ICON_POS_RIGHT))));
                _local8 = createIconPane();
            } else {
                _local2 = setMessageTextWidth(false);
            };
            var _local3:Component = this.createTextComponent(_local2);
            var _local4:JPanel = createTextAreaInnerPane(_local3);
            var _local5:JPanel = _local8;
            var _local6:JPanel = _local4;
            if ((((m_iconPos == ICON_POS_RIGHT)) || ((m_iconPos == ICON_POS_BOTTOM)))){
                _local5 = _local4;
                _local6 = _local8;
            };
            _local1.append(ASwingHelper.horizontalStrut(35));
            if ((((m_iconPos == ICON_POS_LEFT)) || ((m_iconPos == ICON_POS_RIGHT)))){
                if (_local5){
                    _local1.append(_local5);
                };
                _local1.append(ASwingHelper.horizontalStrut(10));
                if (_local6){
                    _local1.append(_local6);
                };
            } else {
                _local9 = ASwingHelper.makeSoftBoxJPanelVertical(SoftBoxLayout.CENTER, 10);
                ASwingHelper.setEasyBorder(_local9, 10);
                _local10 = ASwingHelper.makeSoftBoxJPanel(SoftBoxLayout.CENTER);
                _local11 = ASwingHelper.makeSoftBoxJPanel(SoftBoxLayout.CENTER);
                if (_local5){
                    _local10.append(_local5);
                    ASwingHelper.prepare(_local10);
                    _local9.append(_local10);
                };
                if (_local6){
                    _local11.append(_local6);
                    ASwingHelper.prepare(_local11);
                    _local9.append(_local11);
                };
                ASwingHelper.prepare(_local9);
                _local1.append(_local9);
            };
            _local1.append(ASwingHelper.horizontalStrut(50));
            var _local7:int = _local3.getHeight();
            return (_local1);
        }

    }
}//package Display.DialogUI 
